Skip to content

gh-162473: Fix test.test_capi.test_watchers assuming which watcher IDs are avail… - #162474

Open
alexmalyshev wants to merge 1 commit into
python:mainfrom
alexmalyshev:watcher-ids
Open

alexmalyshev wants to merge 1 commit into
python:mainfrom
alexmalyshev:watcher-ids

Conversation

@alexmalyshev

@alexmalyshev alexmalyshev commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

…able

Some watcher tests hardcode watcher IDs 1 and 3 and assume them to be available. Instead, force an available watcher ID by creating and then immediately removing a watcher. This makes the tests a bit more resilient in the face of other modules registering watchers.

This is relevant to CinderX, which installs watchers on import. The CinderX project runs the CPython test suite with the CinderX module loaded, which breaks the assumptions in these tests.

…able

Some watcher tests hardcode watcher IDs 1 and 3 and assume them to be available.
Instead, force an available watcher ID by creating and then immediately removing
a watcher.  This makes the tests a bit more resilient in the face of other
modules registering watchers.

This is relevant to CinderX, which installs watchers on import.  The CinderX
project runs the CPython test suite with the CinderX module loaded, which breaks
the assumptions in these tests.
@alexmalyshev

Copy link
Copy Markdown
Contributor Author

I believe skip news is appropriate here.

@sergey-miryanov sergey-miryanov changed the title [gh-162473] Fix test.test_capi.test_watchers assuming which watcher IDs are avail… gh-162473: Fix test.test_capi.test_watchers assuming which watcher IDs are avail… Nov 23, 2026
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review skip news tests Tests in the Lib/test dir type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants